import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
// import ModelUpload from '@/components/mgt/model-upload'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/modelupload',
      name: '上传模型',
      component: resolve => require(['@/components/mgt/model-upload'], resolve)
    },
    {
      path: '/login',
      name: '登录',
      component: resolve => require(['@/components/mgt/login'], resolve)
    },
    {
      path: '/medel-Information-editing',
      name: '模型信息编辑',
      component: resolve => require(['@/components/mgt/medel-Information-editing'], resolve)
    },
  ]
})


router.beforeEach((to, from, next) => {
  document.title = to.name;
  next();
})

export default router;
